// *******************************************************************************
// Footnote 16: Location stickiness (controlling for growth of establishment size)
// *******************************************************************************

// Writes the results as adjust to $resultpath/tables/

use "$outpath/database_for_reg.dta", clear

gen dLnemp = Lnemp - log(emp2013)
label var dLnemp "$Delta$ Ln emp."

//eststo clear

global instruct "tdec(3) rdec(3) auto(3) bdec (3) symbol($^a$,$^b$,$^c$) se e(r2_p) tex label nocons"

xi: reghdfe Lnland_pwc Lnpopcma Lnareacma dist_min_NEW i.cat0 spacematep spacematep2 spacematep3 spacematep4 Lnemp i.hoffice i.exports NBdiffbusiness NBdiffnaics4 NBdiffproduct Lndist_maj_air Lndist_maj_sea Lndist_stat_freight Lndist_junction dLnemp if samplep==1, absorb(naics4d eruid) cluster(cmauid)
outreg2 using "$resultpath/tables/adjust.xls", replace $instruct

xi: reghdfe ratio Lnpopcma Lnareacma dist_min_NEW i.cat0 spacemateb spacemateb2 spacemateb3 spacemateb4 Lnemp i.hoffice i.exports NBdiffbusiness NBdiffnaics4 NBdiffproduct Lndist_maj_air Lndist_maj_sea Lndist_stat_freight Lndist_junction dLnemp if samplep==1, absorb(naics4d eruid) cluster(cmauid)
outreg2 using "$resultpath/tables/adjust.xls", append $instruct

